#-------------------------------------------------------------------------------
# Name:        IR_Kneiske
# Purpose:
#
# Author:      GAZ
#
# Created:     18.11.2012
# Copyright:   (c) GAZ 2012
# Licence:     <your licence>
#-------------------------------------------------------------------------------

from pylab import *
##from scipy.interpolate import UnivariateSpline
from scipy import interpolate
from scipy import integrate

lgE, NOur, NMirr = loadtxt('N61Z4G26E220M0.0.dat', unpack='False')
plot(lgE,NOur)
plot(lgE,NMirr)

show()
quit()



plt = 2

for i in range(0,210,10):
##for i in range(0,10,10):
    if plt == 0:
        plot(EIR,(1.+zz[i])**3*DensIR[i])
    elif plt == 1:
        plot(EIR,(1.+zz[i])**3*EIR*DensIR[i])
    elif plt == 2:
        plot(EIR,EIR**2*DensIR[i])
##        plot(EIR,(1.+zz[i])**3*EIR**2*DensIR[i])
##        plot(EIR,(1.+zz[i])**3*EIR**2*ftot(EIR)
##        plot(lgEIR,log10((1.+zz[i])**3*EIR**2)+lgDensIR[i])
    else:
        print ' Wrong value of plt'

txtz = r'z=0.25$\times$ i,  i=0,1,..20'

xscale('log')
xlim(1E-3,20.)
yscale('log')
if plt == 0:
    ylim(1E-7,1E4)
    stxty ='dn$_{\mathrm{IR/UV}}$(E)/dE, eV$^{-1}$ cm$^{-3}$'
    text(1.3,1.5E3,'Kneiske et al.',fontsize=16,color='r')
    text(4.5E-3,2.4E-7,txtz,fontsize=14,color='b')
elif plt == 1:
    ylim(1E-6,20.0)
##    ylim(0.,1.)
    stxty ='Edn$_{\mathrm{IR/UV}}$(E)/dE, cm$^{-3}$'
    text(1.3,8.0,'Kneiske et al.',fontsize=16,color='r')
    text(4.5E-3,2.4E-6,txtz,fontsize=14,color='b')
elif plt == 2:
    ylim(1E-5,0.2)
    stxty ='E$^2$dn$_{\mathrm{IR/UV}}$(E)/dE, eV cm$^{-3}$'
    text(1.3,0.1,'Kneiske et al.',fontsize=16,color='r')
    text(4.5E-3,2.4E-5,txtz,fontsize=14,color='b')
else:
    print ' Wrong value of plt'

xlabel('E, eV',fontsize=14)
ylabel(stxty,fontsize=14)

##spl = UnivariateSpline(lgEIR,log10(EIR**2)+lgDensIR[0],k=5,s=1)
##ys = spl(lgEIR)
##
##plot(lgEIR,ys,color='r')

show()

##print EIR
##EIR,DensIR = loadtxt('IRKn.dat',unpack='True')
##for j in range(nzIR):
##    DensIR[j][:] = loadtxt('IRKn.dat',usecols=j+1,unpack='True')

##print AAA[0][0]
##print AAA[1][0]
##print AAA[201][0]

##print DensIR[200][200]
